function  bci=bciGetParam(bci,varargin)
% experimental train params
bci.numTrials = 15; % 20 % see bciGetTrainBuffer for generating event vector
bci.movDur=[5 5.5 6]; % 
bci.fixDur=4.5;
bci.preRunDur = 0; % duration to wait
bci.eventStr = {'<--','+','-->','Finished.','Pause.','Achtung!','Achtung!'};
bci.baseEvent=2; % event ID for rest
bci.leftEvent=1;
bci.rightEvent=3;

bci.RT = 0.75;%0.5; % assumed reaction time of subject
% experimental test params
bci.testRunDur=300;%500
bci.cursor = 'O';
bci.target = '+';
bci.predictionRate = 2; %refresh rate for prediction (movement change) in Hz
bci.cursorRate = 5; %refresh rate for cursor movement in Hz
bci.cursorSpeed = 0.1; % in percent of screen width per second
bci.minDist = 0.1; % minimum distance target to cursor for new trial
% channel_params
bci.configFile = 'D:\MD_BCI\MEGconfig\robotarm_MEG160.mat'; %header information for BTI Listener
bci.transmitChan=162; % number of transmitted channels
bci.preprocChan=[3:162]; %channel for preprocessing 
bci.chanOfInterest = bciFind(bci.preprocChan,3:162);%[3:6,11:18,21:29,33:36,41:44,47:50,55,56,62]); %channel for classification (subset of preprocChan)
bci.chanLocFile = 'D:\MD_BCI\capLayout\4D248.lay';%'E:\BCI2000\bci64channel\data\motorLocMEG\EEG_29_cartesianSorted.lay';
% preprocessing params
bci.param.bandFreqs = [];%[0.5 200];%[0.5 40];%[3 40];
bci.param.resampFreq = []; % use only for specMethod=0 (timeseries), set empty if no resampling
bci.param.baselineLength=0.2;
% artifact detection params
bci.param.artifactThresh = 3e-12;%2e-4;%0.1;%2500;%0.1;%120; % amplitude threshold??? %bci.max_stdDev=30;       
bci.param.badChanThresh = 0.2;
% classification params
bci.param.winsize = 0.5;%0.5; % width of window in s
bci.param.winoffset = 0.0; %0.25; % offset before and after window (for preprocessing)
bci.param.winsrate = 5; % sampling rate for window in Hz (5)
bci.param.freq=[6 8 10 13 17 20 25 30 120];%[6 8 10 12 14 16 18 20 24 28 32 36];
bci.param.tapers = [2 3]; %[time-bandwidth-product nTapers]
bci.param.classifier = 'svmmulti'; %classifier, currently: 'MIMO' or 'svm','logreg','svmmulti'
bci.param.baseC = []; % svm regularization parameter
bci.param.movdirC = [];
bci.param.specMethod = 2; % 0=timediscrete 1= fft; 2=taper
bci.param.fftWin='hamming'; % type 'help window' for more windows (e.g.hamming,hann,tukeywin,...)
bci.param.fftSmooth = false; % smooth frequency bins
bci.param.balanceTrainSet=true;
bci.param.maxTrainSamp = 1024; %maximum nunber of train data per class
bci.param.spatialMethod='laplace'; %spatial filter method 'laplace' or 'gauss'
bci.param.spatialFilter=4; % 0:no spatial filter 
                           % 1:Biosemi Cap 64 elec.
                           % 2:Easycap 29elec.
bci.param.chanDistThresh=[];    % channel distance thresh for laplace coeff estimation in radians; 
                                % equals FWHM for gauss kernel 
bci.param.detrend=true;

bci.param.CSPfilter = 0; % number of CSP filter, zero if no CSP

bci.param.doNormalizeFeat = true;
bci.doFeatureSelection = false;
bci.refChanCAR = [];%1:length(bci.preprocChan);%1:29;%[];%bci.chanOfInterest; %2:53;% channels to get common average reference if empty, no CAR will be removed

% artifact correction
bci.param.artifactSourceChan=[];

% trigger params
bci.param.useTrigger = true;
bci.param.trigAddress = hex2dec('378'); % parallel port address, set empty to use DIO
bci.param.trigDur = 0.005; % trigger duration in s
